package com.shop.controller;


import com.shop.model.vo.Rsp;
import com.shop.service.ActiveGoodsService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotNull;

/**
 * 活动商品表
 * <p>
 * <p>
 * 陈炼豪(ActiveGoods)表控制层
 *
 * @author makejava
 * @since 2020-11-21 11:02:33
 */
@Validated
@RestController
@AllArgsConstructor
public class ActiveGoodsController {
    /**
     * 服务对象
     */
    private final ActiveGoodsService activeGoodsService;

    @GetMapping("activeProdList")
    public Rsp activeProdList(@NotNull int activeId){
        return activeGoodsService.getByActiveId(activeId);
    }
}
